package com.lcf.system.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.util.List;

/**
 * 团购规则(SysTenantRule)表实体类
 *
 * @author lcf
 * @since 2025-05-02 11:55:03
 */
@Data
@NoArgsConstructor
public class SysTenantRuleDTO {
    //商品id
    @Schema(description = "商品id")
    @NotNull(message = "商品id不能为空")
    private Long goodsId;
    //活动名称
    @Schema(description = "活动名称")
    @NotNull(message = "活动名称不能为空")
    private String ruleName;
    //开始时间
    @Schema(description = "开始时间, yyyy-MM-dd")
    @NotNull(message = "开始时间不能为空")
    private LocalDate startTime;
    //结束时间
    @Schema(description = "结束时间, yyyy-MM-dd")
    @NotNull(message = "结束时间不能为空")
    private LocalDate endTime;
    //商品数量
    @Schema(description = "商品数量")
    @Min(value = 1, message = "商品数量不能小于1")
    private Integer goodsNum;
    //规则明细
    @Schema(description = "规则明细")
    @NotNull(message = "规则明细不能为空")
    private List<RoleDetailDTO> details;
}

